<html>
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-6707232-7']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
<script language="javascript">

function clearform()
{
 document.fee.Std.value = '';
 document.fee.Year.value = '';
 document.fee.Division.value = '';
}

</script>
<body>
<div align="center">

<h2>
Jnana Prabodhini Prashala<br/>
510, Sadashiv Peth, Pune - 30<br/>
</h2><br/>
<form name="fee" action="/fee_report/" method="post"> {% csrf_token %}

<table>
{{ form.as_table }}
</table>
<br/><b>{{ message }}</b><br/><br/>
<input type="submit" value="Check Status"/>
<input type="button" value="Clear Form" onClick="clearform()"/>
</form>

</div>

<br/><br/>

<div align=center>
<!--
<h2>
{{classmaster.AcademicYear}} / {{classmaster.Standard}} {{classmaster.Division}}
</h2><br/>
-->
<table align="center" border="1" cellspacing="5" cellpadding="0">
<tr><th>Student (Roll No)</th><th>Class</th><th>Fee Type</th><th>Amount</th><th>Total Paid</th><th>Balance</th><th>Receipt Nos</th></tr>

{% for row in students %}
<tr><td>{{row.StyleOpenTag|safe}} {{row.Student}} ({{row.YearlyInfo.RollNo}}) {{row.StyleCloseTag|safe}}</td><td>{{row.StyleOpenTag|safe}} {{row.YearlyInfo.ClassMaster}} {{row.StyleCloseTag|safe}}</td>

{% for frow in row.FeeInfo %}
<td>{{frow.FStyleOpenTag|safe}} {{frow.Type}} {{frow.FStyleCloseTag|safe}}</td>
<td>{{frow.FStyleOpenTag|safe}} {{frow.Amount}} {{frow.FStyleCloseTag|safe}}</td>
<td>{{frow.FStyleOpenTag|safe}} {{frow.Total}} {{frow.FStyleCloseTag|safe}}</td>
<td>{{frow.FStyleOpenTag|safe}} {{frow.Balance}} {{frow.FStyleCloseTag|safe}}</td>
<td>
{% for rec in frow.Receipts %}
{{rec.receipt.ReceiptNumber}}|
{% endfor %}
</td></tr>

</font>
<tr><td></td><td></td>
{% endfor %}
</tr>
{% endfor %}
</table>
</div>

</body>
</html>
